﻿<Views:WindowBase x:Class="SharpTalk.Client.WpfApplication.Views.ChatRoomJoinView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Views="clr-namespace:SharpTalk.Client.WpfApplication.Views"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:Controls="clr-namespace:SharpTalk.Client.WpfApplication.Controls"
        xmlns:Resources="clr-namespace:SharpTalk.Client.WpfApplication.Resources"
        mc:Ignorable="d"
        d:DesignHeight="234" d:DesignWidth="464" 
        Style="{StaticResource MessageViewStyle}"
        SizeToContent="WidthAndHeight">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*" MinWidth="200"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <TextBlock Text="{x:Static Resources:Messages.label_name}" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Margin="5" VerticalAlignment="Center" />
        <TextBox Name="txtName" Text="{Binding ChatRoomName, UpdateSourceTrigger=PropertyChanged }" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" Margin="5"/>

        <TextBlock Text="{x:Static Resources:Messages.label_password}" Grid.Row="1" Grid.Column="0" HorizontalAlignment="Right" Margin="5" VerticalAlignment="Center" />
        <PasswordBox Name="passBox" Grid.Row="1" Grid.Column="1" Margin="5" VerticalAlignment="Center" />

        <Controls:DialogActionsPanel
            Grid.Row="3" 
            Grid.ColumnSpan="2"
            HorizontalAlignment="Right"
            ShowButtonOk="True"
            ButtonOkIsDefault="True"
            ButtonOkContent="{x:Static Resources:Messages.label_join}"
            ButtonOkCommand="{Binding ValidateCommand}"
            ButtonOkIsEnabled="{Binding CanJoin}"
            ShowButtonCancel="True" />
   </Grid>
</Views:WindowBase>
